package com.qk.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.Page;
import com.qk.common.PageResult;
import com.qk.dto.OperateLogDTO;
import com.qk.entity.OperateLog;
import com.qk.mapper.OperateLogMapper;
import com.qk.service.OperateLogService;
import org.springframework.stereotype.Service;

/**
 * @author 28188
 */
@Service
public class OperateLogServiceImpl extends ServiceImpl<OperateLogMapper, OperateLog> implements OperateLogService {

    @Override
    public PageResult<OperateLog> pageLog(OperateLogDTO operateLogDTO) {
        Page<OperateLog> page = this.baseMapper.listLog(new Page<>(operateLogDTO.getPage(), operateLogDTO.getPageSize()), operateLogDTO);
        return new PageResult<>(page.getTotal(), page.getResult());

    }
}
